{{!--
Copyright (C) 2017 Draios inc.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
--}}

{{#if isViewAsSupported}}
    <div class="wsd-capture-view__settings-bar">
        <label class="wsd-capture-view__settings-bar-label">
            <span class="wsd-capture-view__settings-bar-label-text">View As</span>
        </label>
        <div class="wsd-capture-view__settings-bar-control">
            {{#sd-button
                classNames="sd-button--raised sd-button--no-text-transform sd-button--highlight-on-hover"
                isActive=isViewAsDottedAscii
                size="sm"
                click=(action "setViewAs" dataStoreConstants.VIEW_AS_DOTTED_ASCII)
            }}
                Dotted ASCII
            {{/sd-button}}
        </div>
        <div class="wsd-capture-view__settings-bar-control">
            {{#sd-button
                classNames="sd-button--raised sd-button--no-text-transform sd-button--highlight-on-hover"
                isActive=isViewAsPrintableAscii
                size="sm"
                click=(action "setViewAs" dataStoreConstants.VIEW_AS_PRINTABLE_ASCII)
            }}
                Printable ASCII
            {{/sd-button}}
        </div>
        <div class="wsd-capture-view__settings-bar-control">
            {{#sd-button
                classNames="sd-button--raised sd-button--no-text-transform sd-button--highlight-on-hover"
                isActive=isViewAsHexAscii
                size="sm"
                click=(action "setViewAs" dataStoreConstants.VIEW_AS_HEX_ASCII)
            }}
                Hex ASCII
            {{/sd-button}}
        </div>
    </div>
{{/if}}

{{#if isOverview}}
    {{wsd-capture-overview
        filePath=captureInfo.filePath
        timelines=metricTimelines
        timeWindow=timeWindow
        filter=filter
        drilldownInfoParam=model.queryParams.drilldownInfoParam
        toggleMetricTimeline=(action toggleMetricTimeline)
        drillDown=(action drillDown)
    }}
{{else}}
    <div class="wsd-capture-view__content">
        {{component
            drillDownComponentName
            selection=currentDrilldownStep.selection
            viewDataStore=viewDataStore
            dataStore=dataStore
            select=(action "select")
            drillDown=(action "drillDown")
        }}
    </div>
{{/if}}
